<?php

// +----------------------------------------------------------------------
// | MC PHP[基于ThinkPHP6.1开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://www.mingchangruanjian.com
// +----------------------------------------------------------------------
// | Author jokerfei [ jokerfei377@gmail.com ]
// +----------------------------------------------------------------------
// | 铭畅软件 技术部 出品
// +----------------------------------------------------------------------


namespace app\api\controller\v1;

use app\api\controller\Base;
use app\common\service\ApiReturn;
use think\facade\Db;
use app\common\model\Invite;
use think\facade\Event;
/** 
 * @Author: 崔先生  
 * @Date: 2023-06-12 14:39:08 
 * @method post 
 * @title 首页接口 
 */
class Home extends Base
{

    public function index()
    {
        $user = Db::name('user')->where('id',1)->find();
        Event::trigger('after_register',$user);
        dump(1);die;
        // $res = Db::name('user')->where('find_in_set(1,user_parent)')->select();
        // return ApiReturn::r(1,$res,'请求成功');
        $id = 1;
        $res = Invite::getUserId($id);
        return ApiReturn::r(1,$res,'请求成功');
    }
}
